﻿<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
	<title>@ViewBag.SysName</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link href="~/theme/style.black.css" rel="stylesheet" id="themeCss" />
	<environment include="Development">
		<link href="~/css/app.css" rel="stylesheet" asp-append-version="true" />
	</environment>
	<environment exclude="Development">
		<link href="~/css/app.css" rel="stylesheet" asp-append-version="true" />
	</environment>
	<link href="~/css/buttons-min.css" rel="stylesheet" asp-append-version="true" />
	<link href="//at.alicdn.com/t/font_1956173_tc74it1f66.css" rel="stylesheet" asp-append-version="true" />
	<environment include="Development">
		<script src="~/lib/vue-2.5.17.js" asp-append-version="true"></script>
	</environment>
	<environment exclude="Development">
		<script src="~/lib/vue-2.5.17.min.js" asp-append-version="true"></script>
	</environment>
	<script>
		var globalData = {
			modules: [],
			user: {},
			baseUrl: '@(Context.Request.PathBase)',
			todoList: [],
			todoIndex:0,
			loginUrl: '@(Url.Action("Login","Sys_User"))',
		};
		(function () {
			var theme = localStorage.getItem('theme');
			if (theme) {
				document.getElementById('themeCss').href = document.getElementById('themeCss').href.replace(/style\.[a-z]+\.css/, 'style.' + theme + '.css');
			}
		})();
	</script>
	<script>
		if (navigator.userAgent.indexOf('Trident') > -1 && navigator.userAgent.indexOf("rv:11.0") > -1) {//ie11
			document.write('\x3Cscript src="' + globalData.baseUrl + '/js/ie11.js" asp-append-version="true">\x3C/script>');
		}
	</script>
	@RenderSection("header", required: false)
</head>
<body class="small" style="margin: 0; padding: 0;">
	<div id="app">
		<table class="crm-head-tab" style="border: 0; margin: 0; border-spacing: 0; width: 100%; border-collapse: separate;">
			<tr>
				<td style="white-space: nowrap; vertical-align: top; padding: 0; padding-left: 20px;">
					<a href="@(Url.Action("Index","Home"))" class="crm-one-link" style="font-size: 14px;">
						@*@ViewBag.SysName*@
						{{global.user.OrgName}}业务管理系统
					</a>
				</td>
				<td class="crm-tab-note" style="width: 100%; padding: 0;"></td>
				<td class="small" style="vertical-align: top; padding: 0;">
					<table class="head-tool-tab" style="border: 0; margin: 0; border-spacing: 0; width: auto;">
						<tr>
							<td style="white-space: nowrap;">
								今天是<span>@(DateTime.Now.ToString("yyyy年M月d日"))</span>，欢迎您 &nbsp;&nbsp; <a href="#" onclick="togglePanelC(this,'headtooltabdiv');return false;" onmouseout="hidePanel('headtooltabdiv')" id='userInfo'>{{global.user.name}}</a><i class="icon-angle-down"></i>
								<div id="headtooltabdiv" class="list-bulk-div" style="width: 100px; margin-left: 20px;" onmouseout="hidePanel('headtooltabdiv')" onmouseover="showPanel('headtooltabdiv')">
									<div class="list-bulk-link" onclick='changePasswd()'>
										修改密码
									</div>
									<div onclick='location.href="@(Url.Action("Logout","Sys_User"))";'>
										安全退出
									</div>
								</div>
							</td>
							<td style="white-space: nowrap;">
								<a href="#" onclick="togglePanelC(this,'switchstylediv');return false;" onmouseout="hidePanel('switchstylediv');">皮肤主题 </a><i class="icon-angle-down"></i>
								<div id="switchstylediv" class="list-bulk-div" style="width: 70px;" onmouseout="hidePanel('switchstylediv')"
									 onmouseover="showPanel('switchstylediv');">
									<div onclick="selectTheme('black');">
										默认
									</div>
									<div onclick="selectTheme('green');">
										绿色
									</div>
									<div onclick="selectTheme('red');">
										红色
									</div>
									<div onclick="selectTheme('blue');">
										蓝色
									</div>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		@*模块开始*@
		<table class="crm-head-tab" style="border: 0; margin: 0; border-spacing: 0; width: 100%; border-collapse: separate;">
			<tr>
				<td style="width: 20px" class="small">
					&nbsp;
				</td>
				<td class="small" style="white-space: nowrap;">
					<table style="border: 0; margin: 0; border-spacing: 0; height: 27px; width: auto; border-collapse: separate;" id="modulesTbl">
						<tr>
							<td v-for="(m,midx) in global.modules" :class="{'crm-head-link-on':currentM&&m.ID==currentM.ID,'crm-head-link':!currentM||m.ID!=currentM.ID}" :data-mid="'ModuleMenu'+m.ID" onmouseover="togglePanelR(this,this.dataset.mid)" onmouseout="hidePanel(this.dataset.mid)" style="text-align: center; white-space: nowrap">
								<a :href="m.Services&&m.Services.length>0?m.Services[0].Url:''" onclick="utils.pageReset();">
									<i :class='m.Icon'></i>
									{{m.Name}}
								</a>
							</td>
						</tr>
					</table>
				</td>
				<td style="padding-right: 10px; text-align: right;">
					&nbsp;
				</td>
			</tr>
		</table>
		@*模块结束*@
		@*当前模块子功能开始*@
		<table class="crm-head-level" style="border: 0; margin: 0; border-spacing: 0; width: 100%; border-collapse: separate;margin-bottom: 2px;">
			<tr>
				<td style="padding: 2px;">
					<table style="border: 0; margin: 0; border-spacing: 0; border-collapse: separate; width: auto;">
						<tr>
							<td style="width: 20px" class="small">
								&nbsp;
							</td>
							<td v-for="s in currentM&&currentM.Services" class="crm-head-level-tab" :class="{'crm-head-level-tab-on':currentS&&currentS.ID==s.ID}" style="overflow: hidden; word-break: break-all;">
								<a :href="s.Url" onclick="utils.pageReset();">{{s.Name}}</a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		@*当前模块子功能结束*@
		@*模块菜单开始*@
		<div v-for="m in global.modules" class="crm-head-dropmnu" :id="'ModuleMenu'+m.ID" :data-mid="'ModuleMenu'+m.ID" onmouseout="hidePanel(this.dataset.mid)" onmouseover="showPanel(this.dataset.mid)">
			<table style="border: 0; margin: 0; border-spacing: 0;">
				<tr v-for="ms in m.Services">
					<td style="padding: 0;">
						<a :href="ms.Url" onclick="utils.pageReset();"><i :class='ms.Icon' style="padding-right: 3px;"></i>{{ms.Name}}</a>
					</td>
				</tr>
			</table>
		</div>
		@*模块菜单结束*@
		@*当前页面信息及快捷菜单开始*@
		<table class="small page-toolbar" style="border:0;margin:0;border-spacing:0;width:100%;padding:0 15px;visibility:hidden;" :style="{visibility:'visible'}" v-if="!hideBreadcrumb">
			<tr>
				<td class="moduleName">
					@*面包屑*@
					{{currentM?currentM.Name:""}} > <a class="hdrLink" :href="currentS ? currentS.Url : ''">{{currentS ? currentS.Name : ''}}</a>
				</td>
				<td style="white-space: nowrap;">
					<table style="border: 0; margin: 0; border-spacing: 0;width: 100%;">
						<tr>
							<td class="small" style="padding: 0;">
								<table style="border: 0; margin: 0; border-spacing: 0; width: auto; border-collapse: separate; padding: 5px;">
									<tr>
										@RenderSection("quickmenu", required: false)
									</tr>
								</table>
								@*<td class="small" style="width:300px;">
									<table style="border: 0; margin: 0; border-spacing: 0; width: auto; border-collapse: separate;">
										<tr>
											<td style="text-align:right;">
												<span style="cursor: pointer;" title="">
													<i class="icon-plus icon-2x pull-left icon-border crm-bu-style">
													</i>&nbsp;
												</span>
												<div id="addfirsrtabdiv" class="list-bulk-div" style="width: 120px;" onmouseout="DropDownHide('addfirsrtabdiv')"
													 onmouseover="DropDownShow('addfirsrtabdiv')">
													<div class="list-bulk-link" onclick="window.location.href='/Order/Edit.aspx';">
														业务开单
													</div>
													<div class="list-bulk-link" onclick="window.location.href='/Member/';">
														客户列表
													</div>
													<div class="" onclick="window.location.href='/Product/';">
														商品列表
													</div>
													<div class="" onclick="window.location.href='/Admin/UserList.aspx?type=';">
														职工列表
													</div>
													<div class="list-bulk-link" onclick="window.location.href='/Admin/UserList.aspx';">
														用户列表
													</div>
												</div>
												<span style="cursor: pointer;" title="">
													<i class="icon-plus icon-2x pull-left icon-border crm-bu-style">
													</i>&nbsp;
												</span>
												<span style="cursor: pointer;" title="">
													<i class="icon-plus icon-2x pull-left icon-border crm-bu-style">
													</i>&nbsp;
												</span>
											</td>
										</tr>
									</table>*@
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		@*当前页面信息及快捷菜单结束*@
		<div id="loading" style="position: absolute;display:none;  left: 930px; top: 95px; height: 27px; white-space: nowrap;">
			<img src="~/img/loading.gif" />
		</div>
		@*提醒开始*@
		<div class="detail-panel-div" id="ReminderPnl" style="text-align: left;border:none;display:none;" v-show="global.todoList&&global.todoList.length>0">
			<div id="magage1" class="activiy-message-div">
				<table class="windLayerHeadingULine" cellpadding="0" cellspacing="0">
					<tbody>
						<tr class="windLayerHeadingTr" style="cursor: pointer;">
							<td id="moveSortView" class="windLayerHeading" style="width: 80%; cursor: move">
								&nbsp;&nbsp;温馨提醒
							</td>
							<td>
								&nbsp;
							</td>
							<td style="width: 50%; text-align: right;">
								<input class="windLayerBtclose" type="button" title="关闭" onclick="$('#ReminderPnl').hide();" />&nbsp;&nbsp;
							</td>
						</tr>
					</tbody>
				</table>
				<div>
					<table class="">
						<tbody>
							<tr>
								<td colspan="3" style="padding-left: 10px;">
									<span class="activiy-message-sendby" id="reminderTitle" v-html="global.todoList[global.todoIndex]&&global.todoList[global.todoIndex].title">&nbsp;</span>
								</td>
							</tr>
							<tr>
								<td colspan="3" class="activiy-message-content" valign="top" style="" id="reminderContent"><div class="activiy-message" v-html="item" v-for="(item) in (global.todoList[global.todoIndex]&&global.todoList[global.todoIndex].items||[])"></div></td>
							</tr>
							<tr>
								<td style="padding-left: 10px;" v-show="global.todoList[global.todoIndex]&&global.todoList[global.todoIndex].url">
									&nbsp;&nbsp;
									<a style="" href="javascript:showMoreReminder();">点击查看更多...</a>
								</td>
								<td></td>
								<td style="text-align: right;">
									<a href="javascript:showPrevReminder();" id="reminderNavPrev" v-show="global.todoIndex>=1"><i class="icon-caret-left" style="font-size: 15px;"></i></a>&nbsp;&nbsp;&nbsp;
									<span style="color: #999;" id="reminderNav">{{global.todoIndex+1}}&nbsp;/&nbsp;{{global.todoList.length}}</span>&nbsp;&nbsp;&nbsp;
									<a href="javascript:showNextReminder();" id="reminderNavNext" v-show="global.todoIndex<global.todoList.length-1"><i class="icon-caret-right" style="font-size: 15px;"></i></a>&nbsp;&nbsp;&nbsp;
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		@*提醒结束*@
		@RenderBody()
		<table class="settingsSelectedUI" style="margin: 0; border-top: 2px dashed #E5E5E5; border-spacing: 0; width: 100%; padding: 0 5px;position:fixed;bottom:0;">
			<tr>
				<td class="small">
					<a href='javascript:void(0);'>当前程序版本:@(ViewBag.AppVersion)，数据库版本:@(ViewBag.DbVersion)</a>
				</td>
				<td class="small" style="display: flex;align-items: center;justify-content: right;">
					Powered by 
					<a href='@ViewBag.SiteSupportUrl' target='_blank' style="text-decoration: none;">&nbsp;<img src='~/img/logo.jpg' width='60' border="0" /></a>
				</td>
			</tr>
		</table>
	</div>
	<script src="~/lib/jquery-1.12.4.min.js" asp-append-version="true"></script>
	<script src="~/lib/layer/layer-3.1.1.js" asp-append-version="true"></script>
	<script src="~/js/app.js" asp-append-version="true"></script>
	<script src="~/js/components.js" asp-append-version="true"></script>
	<script type="text/javascript">
		(function () {
			var menus = localStorage.getItem('sys_menus');
			if (!menus) {
				utils.ajaxPost('@(Url.Action("GetCurrentUserMenus", "Sys_UserRole"))', null, function (resp) {
					globalData.modules = resp.data;
					localStorage.setItem("sys_menus", JSON.stringify(resp.data));
				}, function () {
					globalData.modules = [];
				});
			} else {
				globalData.modules = JSON.parse(menus);
			}
			var uinfo = localStorage.getItem('uinfo');
			if (!uinfo) {
				top.location.href = '@(Url.Action("Logout","Sys_User"))';
			} else {
				globalData.user = JSON.parse(uinfo);
			}

			var udetail = localStorage.getItem('udetail');
			if (!udetail) {
				utils.ajaxPost('@(Url.Action("ViewMyDetail", "Sys_User"))', null, function (resp) {
					globalData.user = Object.assign({}, globalData.user||{}, resp.data);
					localStorage.setItem("udetail", JSON.stringify(resp.data));
				});
			} else {
				globalData.user = Object.assign({}, globalData.user||{}, JSON.parse(udetail));
			}

			var todoListStr = localStorage.getItem("sys_todolist");
			if (!todoListStr) {
				refreshTodoList();
			} else {
				var todoList = JSON.parse(todoListStr);
				if (!todoList || todoList.length == 0) {
					refreshTodoList();
				} else {
					globalData.todoList = todoList;
				}
			}
		})();
		function selectTheme(theme) {
			localStorage.setItem('theme', theme);
			document.getElementById('themeCss').href = document.getElementById('themeCss').href.replace(/style\.[a-z]+\.css/,'style.'+theme+'.css');
		}

		function refreshTodoList() {
			@*utils.ajaxPost('@(Url.Action("TodoList", "LawerOA_Case"))', null, function (resp) {
				globalData.todoList = resp.data;
				localStorage.setItem("sys_todolist", JSON.stringify(resp.data));
			}, function () {
				globalData.todoList = [];
			});*@
		}

		function clearTodoList() {
			localStorage.removeItem("sys_todolist");
			globalData.todoList = [];
		}

		function showPrevReminder() {
			if (globalData.todoIndex >=1) {
				globalData.todoIndex = globalData.todoIndex - 1;
			}
		}

		function showNextReminder() {
			if (globalData.todoIndex < globalData.todoList.length - 1) {
				globalData.todoIndex = globalData.todoIndex + 1;
			}
		}

		function showMoreReminder() {
			if (!globalData.todoList || !globalData.todoList[globalData.todoIndex]) {
				return;
			}
			var todoItem = globalData.todoList[globalData.todoIndex];
			if (todoItem && todoItem.url) {
				var url = todoItem.url;
				if (url.indexOf("?") > 0) {
        			url = url + "&nc=" + new Date().getTime();
        		} else {
        			url = url + "?nc=" + new Date().getTime();
        		}
        		location.href = url;
			}
		}

		function changePasswd() {
			layer.open({
				id: 'ChangePasswd',
				type: 2,
				title: false,
				shadeClose: false,
				shade: [0.3, '#000'],
				//maxmin: true, //开启最大化最小化按钮
				area: ['450px', '180px'],
				content: '@(Url.Action("ChangePasswd","Sys_User"))?nc=' + new Date().getTime()
			});
		}
	</script>
	@RenderSection("footer", required: false)
</body>
</html>
